package com.gupao.simpleFactory;

public class FactoryTest {
    /*public static void main(String[] args) {
        Milk milk = new Milk();
        milk.drinking();
    }*/

    /*public static void main(String[] args) {
        Milk milk = MilkFactory.create("伊利");
        milk.drinking();
    }*/

    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
        Milk milk = MilkFactory.create(MengNiu.class);
        milk.drinking();
    }
}
